{% extends 'WebQuant/base.html' %}
{% block title %}交易详情{% endblock %}
{% block content %}
{% include 'WebQuant/deal_nav.html' %}
<div class="leftmask"></div>
{% include 'WebQuant/deal_nav_left.html' %}
<div class="right_cont" style="width:55%;">
    <div class="clouddeal" >
        <div class="moudle_bottom">
        <div class="table_head">
            <div class="table_h1">日期</div>
            <div class="table_h2">时间</div>
            <div class="table_h3">股票代码</div>
            <div class="table_h4">买/卖</div>
            <div class="table_h5">数量</div>
            <div class="table_h6">成交价</div>
            <div class="table_h7">总成本</div>
            <div class="table_h8">交易佣金</div>
        </div>
        <ul class="table_data">
            {% for trade in trade_detail.trade_list %}
            <li>
                <div class="tables_d1">{{trade.date}}</div>
                <div class="tables_d2">{{trade.time}}</div>
                <div class="tables_d3">{{trade.stock_name}} <span>{{trade.stock_code}}</span></div>
                {% if trade.order_state > 0%}
                    <div class="tables_d4" id="c_red">买入</div>
                {% else %}
                    <div class="tables_d4" id="c_green">卖出</div>
                {% endif %}
                <div class="tables_d5">{{trade.order_count}}</div>
                <div class="tables_d6">{{trade.price}}</div>
                <div class="tables_d7">￥{{trade.total_cost}}</div>
                <div class="tables_d8">￥{{trade.commission}}</div>
            </li>
            {% endfor %}
        </ul>
        <div class="foot">
            <div id="transaction">{{trade_detail.total_transaction}} transaction</div>
            <div>买进 <span id="c_orange">￥{{trade_detail.total_buy}}</span></div>
            <div style="border:none;padding-right:0">卖出<span id="c_blue" >￥{{trade_detail.total_sell}}</span></div>
        </div>
    </div>
    </div>
</div>
{% endblock %}